/*! \file debug.h
 *	\brief <write description for debug.h>
 *
 *	created:	2010/04/18
 *	created:	18:4:2010   13:52
 *	filename: 	c:\Users\venn\Documents\tactics-engine\libs\core\debug.h
 *	file path:	c:\Users\venn\Documents\tactics-engine\libs\core
 *	file base:	debug
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _core_DEBUG_H_
#define _core_DEBUG_H_

#pragma once

#include "Format.h"

#if defined TT_DEBUG
#	define TT_OUTPUT(args) core::debug::Output(args) 
#else //defined TT_RELEASE
#	define TT_OUTPUT(...) (void)0
#endif

#if defined(TT_WIN32)
#   define TT_DEBUG_BREAK() DebugBreak()
#elif defined(TT_MACOS)
#   define TT_DEBUG_BREAK() Debugger()
#elif defined(TT_UNIX)
#   include <signal.h>
#   define TT_DEBUG_BREAK() raise(SIGTRAP)
#else
#	error "Uknown platform!!"
#endif

namespace tt{
namespace core{
namespace debug{

void Output(const Char*);
void Output(const String&);
void Output(const Format& format);

} //namespace debug
} //namespace core
} //namespace tt

#endif //_core_DEBUG_H_